import request from '@/utils/request'

const prefix = "/vehicleApplication"



// 车辆列表
export function myCarList(data) {
	return request({
		url: '/vehicle/list',
		method: 'get',
		data
	})
}

// 车辆列表
export function commonRequest(data) {
	return request({
		url: '/common/getProxyRequest',
		method: 'post',
		data
	})
}


// 车辆列表
export function userLogin(data) {
	return request({
		url: '/login',
		method: 'post',
		data
	})
}





export function getCarUserInfo(data) {
	return request({
		url: '/vehicle/queryVehicleDetails',
		method: 'get',
		data
	})
}
// 车辆列表
export function userCasLogin(data) {
	return request({
		url: '/login/cas',
		method: 'get',
		data
	})
}

// 添加车辆
export function myCarAdd(data) {
	return request({
		url: prefix + '/addVehicleApplication',
		method: 'post',
		data
	})
}
// 校验是否超过两辆车
export function myCarCheck() {
	return request({
		url: '/vehicleApplication/checkVehicleNum',
		method: 'get',
	})
}

// 获取人员权限
export function getTabList(e,i) {
	return request({
		url: '/quota/queryMenuPermissions?userId='+e+'&departmentId='+i,
		method: 'post',

	})
}

export function getUserInfo() {
	return request({
		url: '/user/queryCASUser',
		method: 'get',
	})
}

// 编辑车辆
export function UpdateCarAdd(data) {
	return request({
		url: prefix + '/updateVehicleApplication',
		method: 'put',
		data
	})
}


// 代申请添加车辆
export function myCarDaiAdd(data) {
	return request({
		url: prefix + '/addAgencyVehicleApplication',
		method: 'post',
		data
	})
}

// 删除车辆
export function deleteDaiAdd(data) {
	return request({
		url:  '/vehicle/deleteCatByLicensePlate?licensePlate='+ data.licensePlate,
		method: 'delete',
	})
}

// 代申请添加车辆
export function myAddDaiAdd(data) {
	return request({
		url: '/quota/batchAddQuota',
		method: 'post',
		data
	})
}

// 申请历史
export function myCarRequest(data) {
	return request({
		url: prefix + '/queryVehicleApplicationByPage',
		method: 'post',
		data
	})
}

// 下属车辆
export function xiashuRequest(data) {
	return request({
		url: '/vehicle/subordinateVehicleList',
		method: 'get',
		data
	})
}

// 车辆统计
export function TongRequest(data) {
	return request({
		url: '/parkingAreaApproval/statisticsParkingAreaApproval',
		method: 'get',
		data
	})
}

// 进出记录
export function recordRequest(data) {
	return request({
		url: '/vehicle/queryVehicleEntryAndExitRecord',
		method: 'get',
		data
	})
}

// 消息发送
export function messageAdd(data) {
	return request({
		url: '/messageSendingRecord/addMessage',
		method: 'post',
		data
	})
}

// 消息记录
export function messageList(data) {
	return request({
		url: '/messageSendingRecord/queryByPage',
		method: 'post',
		data
	})
}

// 车辆统计
export function qushiRequest(data) {
	return request({
		url: '/parkingAreaApproval/statisticsOnVehicleEntryAndExitTrends',
		method: 'get',
		data
	})
}



// 下车辆管理
export function quanbuRequest(data) {
	return request({
		url: '/vehicle/allVehicleList',
		method: 'get',
		data
	})
}

// 代申请的
export function daiRequest(data) {
	return request({
		url: '/vehicle/vehicleList',
		method: 'post',
		data
	})
}




// 申请详情
export function myCarRequestInfo(data) {
	return request({
		url: prefix + '/queryVehicleApplication',
		method: 'get',
		data
	})
}

// 配额list
export function quotaList(data) {
	return request({
		url: '/quota/list',
		method: 'get',
		data
	})
}
// 修改配额信息
export function quotaUpdate(data) {
	return request({
		url: '/quota/updateQuota',
		method: 'put',
		data
	})
}




// 待办事项
export function doingThings( data) {
	return request({
		url:  '/api/redo/list',
		method: 'get',
		data
	})
}

// 修改密码
export function updatePwd( data) {
	return request({
		url:  '/system/user/profile/updatePwd',
		method: 'post',
		data
	})
}


// 应用列表
export function appData() {
	return request({
		url: prefix + '/menu',
		method: 'get'
	})
}

// 消息通知
export function noticeData() {
	return request({
		url:  '/api/notice/list',
		method: 'get'
	})
}

export function noticeInfo(id) {
	return request({
		url:  '/api/notice/info/' + id,
		method: 'get'
	})
}

